package com.breakfast.fun.data.entity.user.dynamic;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/25.
 */
public class DynamicBean {

    /**
     * id : 970
     * userId : 5407
     * userName : 183****8629
     * userMobile : 18359928629
     * userPhoto : http://m.52letsgo.cn
     * content : 又可以点明天的早餐啦
     * count : 0
     * praise : 0
     * addTime : 2016-08-24 16:39:20
     * image : http://m.52letsgo.cn/user_image/7/0/2dc6c943-8_1218019931.jpg
     * address :
     */

    private int id;
    private int userId;
    private String userName;
    private String userMobile;
    private String userPhoto;
    private String content;
    private int count;
    private int praise;
    private String addTime;
    private String image;
    private String address;

    public static DynamicBean objectFromData(String str) {

        return new Gson().fromJson(str, DynamicBean.class);
    }

    public static List<DynamicBean> arrayDynamicBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<DynamicBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getUserPhoto() {
        return userPhoto;
    }

    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getPraise() {
        return praise;
    }

    public void setPraise(int praise) {
        this.praise = praise;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
